<%layout("/common/layout.html"){%>

<%include("/common/head.html"){}%>

<div class="am-lg">

    <div class="am-text-center">
        <h1>我发布的</h1>
    </div>

    <div class="am-u-sm-12">

        <%include("/common/user_left.html"){}%>

        <div class="am-u-sm-7">
            <br>

                <%for(book in page.list){%>

                <div class="am-g mybooks">
                    <img class="img-in" src="${book.img}" alt=""/>

                    <div class="info">
                        <h2>${book.name}</h2>

                        <%if(book.type==0){%>
                        <p class="am-text-warning">状态:出售</p>
                        <%}else if(book.type==1){%>
                        <p class="am-text-warning">状态:求购</p>
                        <%}else{%>
                        <p class="am-text-warning">状态:赠送</p>
                        <%}%>

                        <p>${printTime(book.time)}</p>
                    </div>


                    <br>

                    <div class="am-g am-text-center">
                        <a href="${base}/book?book=${book.id}&page=1" class="am-btn am-btn-primary">查看</a>

                        <a href="${base}/book/deleteBook?book=${book.id}" class="am-btn am-btn-warning">交易完成</a>
                    </div>

                </div>

                <%}%>


            <br>

            <%include("/common/paginate.html",{"currentPage":page.pageNumber,"totalPage":page.totalPage,"actionUrl":actionUrl!})
            {}%>


        </div>
    </div>
</div>


<%}%>